package wsz.sqlSession;

import wsz.pojo.Configuration;

/**
 * 工厂模式：生成sqlsession
 * @author wsz
 * @date 2021/10/1 1:15
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory{

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
